/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package kodi.model.UserRights;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.*;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;


@Entity  @Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class Modules implements Serializable{
    private Set<SubModule> subModules = new HashSet();
    private int module_id;
    private String module_name;

    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public int getModule_id() {
        return module_id;
    }
    
    public void setModule_id(int module_id) {
        this.module_id = module_id;
    }

    public String getModule_name() {
        return module_name;
    }

    public void setModule_name(String module_name) {
        this.module_name = module_name;
    }

    @OneToMany
    public Set<SubModule> getSubModules() {
        return subModules;
    }

    /**
     * @param subModules the subModules to set
     */
    public void setSubModules(Set<SubModule> subModules) {
        this.subModules = subModules;
    }
}
